var setpwdVue = new Vue({
	el: "body",
	data: {
		code: ""
	},
	created: function() {
		init()
	},
	methods: {
		setPwd: function() {
			if(this.code.trim().length == 0) {
				alert("输入不能为空")
			} else {
				currentUser = AV.User.current(); //判断用户是否登录
				currentUser.set("password", this.code)
				currentUser.save().then(function(success) {
					console.log(success)
					location.href = "../index/index.html"
				}, function(error) {
					alert(JSON.stringify(error));
				})

			}
		}
	}
})